#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>

int main(){
     printf("开始替换：\n");
     // int execve(path,argv,env)
     //一定要注意：参数和环境变量一定要以NULL结尾
     char* argv[]={"./execve","-l","-a",NULL};
     char* env[]={"MYVAL=1000","Path=./",NULL};
     //execve("/bin/ls",argv,env);
     //execl("/bin/ls","/bin/ls","-l","-a",NULL);
     //execlp("./main","./main","-l","-a",NULL);
     //execle("./main","./main","-l","-a",NULL,NULL);
     execv("./main",argv);
     printf("替换失败\n");
     return 0;
}
